<template>
  <codemirror
      v-model="code"
      placeholder="Code goes here..."
      :style="{ height: '400px' }"
      :autofocus="true"
      :indent-with-tab="true"
      :tab-size="2"
      :extensions="extensions"
  />
</template>

<script>
// https://github.com/surmon-china/vue-codemirror
// import {defineComponent} from 'vue'
import {Codemirror} from 'vue-codemirror'
import {javascript} from '@codemirror/lang-javascript'
import {oneDark} from '@codemirror/theme-one-dark'

export default {
  name: "codeEditorMirror",
  components: {
    Codemirror
  },
  data() {
    return {
      code: "false\nddef\nddef\nddef\nddef\nddef\nddef\nddef\nddef\nddef\nddef\nddef",
      extensions: [javascript(), oneDark],
      log: console.log
    }
  }
}
</script>

<style scoped>

</style>